/*
package com.eurake.seckill.Config;

import org.springframework.amqp.core.*;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.HashMap;
import java.util.Map;

@Configuration
public class RabbitMQConfigHeaders {

    private static final String QUEUE01 = "queue_headers01";
    private static final String QUEUE02 = "queue_headers02";

    private static final String EXCHANGE_NAME = "HeadersExchange";

    @Bean
    public Queue queue01() {
        return new Queue(QUEUE01);
    }

    @Bean
    public Queue queue02() {
        return new Queue(QUEUE02);
    }

    @Bean
    public HeadersExchange headersExchange() {
        return new HeadersExchange(EXCHANGE_NAME);
    }

    @Bean
    public Binding headersBinding01() {
        Map<String, Object> arguments = new HashMap<>();
        arguments.put("color","red");
        arguments.put("speed","low");
        return BindingBuilder.bind(queue01()).to(headersExchange()).whereAny(arguments).match();
    }

    @Bean
    public Binding headersBinding02() {
        Map<String, Object> arguments = new HashMap<>();
        arguments.put("color","red");
        arguments.put("speed","fast");
        return BindingBuilder.bind(queue02()).to(headersExchange()).whereAll(arguments).match();
    }
}
*/
